package Homework;

import java.io.*;

public class CopyDemo3Buffered {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("t1.txt");
        BufferedInputStream bis=new BufferedInputStream(fis);

        FileOutputStream fos = new FileOutputStream("t1copy.txt");
        BufferedOutputStream bos = new BufferedOutputStream(fos);

        int len;

        while ((len=bis.read())!=-1){
            bos.write(len);
        }
        System.out.println("复制完毕！");
        bis.close();
        bos.close();


    }
}
